<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
     
	<script>

var layout = [
    { field: "objid", datatype:"string"},
    { field: "disindex", datatype:"string"},
    { field: "identificationId", datatype:"string"},
    { field: "name", datatype:"string",
        // Declare that we need the ComboBox for suggestions (autoComplete by default)
        autoComplete: true
    },
    { field: "code", datatype:"string",
        // Declare that we need the ComboBox for suggestions
        autoComplete: true,
        // Configure the ComboBox, so that it does not auto-complete our input
        dataTypeArgs: {
            autoComplete: false
        }
    },
    { field: "descript", datatype:"string",
        // Declare that we do not need the following conditions for this column
        disabledConditions: ["contains", "notcontains"]
    },
    { field: "email", datatype:"string",
        // Declare that we need the ComboBox for suggestions
        autoComplete: true,
        // Configure the ComboBox, so that it does not auto-complete our input
        disabledConditions: ["contains", "notcontains"]
    }, 
    { field: "birthday", datatype:"date",
        // Declare how the data in store should be parsed to a Date object.
        dataTypeArgs: {
            datePattern: "yyyy-M-d"
        }
    },
    { field: "createtime", datatype:"string",
    formatter: function(data, rowIndex){
    		return dojo.date.locale.format(new Date(data.replace(/-/,"/")), {                    
    			datePattern: "yyyy/MM/dd HH:mm:ss",                    
    			selector: "date",                    
    			locale: "en"                
    		});            
    	}
    },
    { field: "updatetime", datatype:"string",
    formatter: function(data, rowIndex){
    		return dojo.date.locale.format(new Date(data.replace(/-/,"/")), {                    
    			datePattern: "yyyy/MM/dd HH:mm:ss",                   
    			selector: "date",                    
    			locale: "en"                
    		});       
    	}
    },{
    	field:'createuserObjid' 
    }
];

// In case you've close the filter bar, here's a way to bring it up.
function showFilterBar(){
    dijit.byId('grid').showFilterBar(true);
}

dojo.ready(function(){

    //var store = new dojo.data.ItemFileWriteStore({data: data});
 	var store = new dojo.data.ItemFileReadStore({
        	url: "rest/RmSystemUserService/getrmsystemuserlist"
   		 });
    var grid = new dojox.grid.EnhancedGrid({
        id: 'grid5',
        store: store,
        structure: layout,
        plugins: {
            filter: {
                // Show the closeFilterbarButton at the filter bar
                closeFilterbarButton: true,
                // Set the maximum rule count to 5
                ruleCount: 5,
                // Set the name of the items
                itemsName: "songs"
            },
            pagination: {
              pageSizes: ["25", "50", "100", "All"],
              description: true,
              sizeSwitch: true,
              pageStepper: true,
              gotoButton: true,
                      /*page step to be displayed*/
              maxPageStep: 4,
                      /*position of the pagination bar*/
              position: "bottom"
            },
            indirectSelection: {
            	headerSelector:true, 
            	width:"40px", 
            	styles:"text-align: center;"
            } 
        }
    });
    grid.placeAt('gridContainer5');
    grid.startup();
});
	</script>
    <div id="gridContainer5" style="width: 100%; height:  100%;"></div>
